package com.fyl.dto;

import com.fyl.domain.BaseModel;
import org.springframework.beans.BeanUtils;

public interface BaseDTO<T extends BaseModel> {

    default T buildModel(T t) {
        BeanUtils.copyProperties(this, t);
        return t;
    }

    default void initPropByModel(T t) {
        BeanUtils.copyProperties(t, this);
    }

}
